<%-- 
    Document   : conexion
    Created on : 08/03/2009, 08:37:12 PM
    Author     : Joel
--%>
   <%@ page  import="java.io.*,java.util.*,java.net.*,java.sql.*" %>
<%!   
    String usuarioMysql(){   
        return  "root";   
    }   
    String passwordMysql(){   
        return  "root";   
    }
    //Abrir la conexion
    Connection getConexion(){   
        Connection  con = null;
        try{   
            //Para Windows
            //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();   
            //Para Windows con ODBC mediante un DSN(Fuente de datos)
            //con = DriverManager.getConnection("jdbc:odbc:marketfarm");   

            //Para linux
            Class.forName("com.mysql.jdbc.Driver").newInstance();   
           // con = DriverManager.getConnection("jdbc:mysql://localhost:3306/marketfarm","root","root");
            con = DriverManager.getConnection("jdbc:mysql://localhost/rmirc20_MarketFarmData","rmirc20","1qaz2wsx");   
         }   
        catch(ClassNotFoundException e){e.toString();}   
        catch(SQLException e){e.toString();}
        catch(Exception e){e.toString();}
        return  con; 
    }
 
%> 